#ifndef BBH_OUTPUT_H_
#define BBH_OUTPUT_H_
#ifdef __cplusplus
extern "C"
{
#endif

#include "bbh_include.h"

enum enum_output_type {
    output_type_none = 0,
    output_type_stdout,
    output_type_file
};

typedef struct bbh_output_s
{
    int  type;
    const char * id;
    int  (*open)(const char*s, size_t len, void**handle_ptr);
    int  (*write)(void*handle, const char*s, size_t len);
    int  (*print)(void*handle, const char*format, ...);
    void (*flush)(void*handle);
    void (*close)(void*handle);
} bbh_output_t;

bbh_output_t*  bbh_output_init(const char*filepath);

#ifdef __cplusplus
}
#endif
#endif